package com.hengpeng.itfinoss.service.borrowInfo;

import java.util.Date;
import java.util.List;

import com.hengpeng.common.exception.ServiceResult;
import com.hengpeng.itfinbase.persist.BorrowInfo;
import com.hengpeng.itfinbase.persist.BorrowInfo.BorrowStatus;
import com.hengpeng.itfinbase.persist.InvestInfo;

public interface BorrowInfoService
{
	/**
	 * <pre>
	 * 标的列表分页查询
	 * </pre>
	 * @param borrowName
	 * @param borrowUserName
	 * @param start
	 * @param end
	 * @param status
	 * @return
	 */
	public ServiceResult<Long> queryCount(String borrowName, String borrowUserName, Date start, Date end,
			BorrowStatus[] status);

	/**
	 * <pre>
	 * 标的记录条数
	 * </pre>
	 * @param borrowName
	 * @param borrowUserName
	 * @param start
	 * @param end
	 * @param status
	 * @param pageIndex
	 * @param pageSize
	 * @return
	 */
	public ServiceResult<List<BorrowInfo>> queryList(String borrowName, String borrowUserName, Date start, Date end,
			BorrowStatus[] status, Integer pageIndex, Integer pageSize);

	/**
	 * <pre>
	 * 投资记录
	 * </pre>
	 * @param borrowId
	 * @param pageIndex
	 * @param pageSize
	 * @return
	 */
	public ServiceResult<List<InvestInfo>> queryInvestList(Long borrowId, Integer pageIndex, Integer pageSize);

	/**
	 * <pre>
	 * 投标记录条数
	 * </pre>
	 * @param borrowId
	 * @param pageIndex
	 * @param pageSize
	 * @return
	 */
	public ServiceResult<Long> queryInvestCount(Long borrowId);

	/**
	 * <pre>
	 * 获取标的
	 * </pre>
	 * @param id
	 * @param status
	 * @return
	 */
	public BorrowInfo getBorrowInfo(Long id, BorrowStatus status);
}
